<template>
  <div>
    <van-sticky>
      <div class="home">
        <div class="top">
          <div
            class="iconfont icon-chuangjian"
            @click="$router.push('/Search/establish')"
          ></div>
          <div class="ipt" @click="$router.push('/Search/search')">
            <input type="text" placeholder="营养餐" />
            <div class="iconfont icon-sousuo"></div>
          </div>

          <div class="iconfont icon-liebiao" @click="$router.push('/Search/classification')"></div>
          <div
            class="iconfont icon-tongzhi"
            @click="$router.push('/Search/tongzhilist')"
          ></div>
        </div>
        <div class="title">
          <router-link tag="div" to="/home/watch" class="items"
            >关注</router-link
          >
          <router-link tag="div" to="/home/recommend" class="items"
            >推荐</router-link
          >

          <router-link tag="div" to="/home/unscramble" class="items"
            >笔记</router-link
          >
          <router-link tag="div" to="/home/Notice" class="items"
            >视频</router-link
          >
          <router-link tag="div" to="/home/consulting" class="items"
            >活动</router-link
          >
        </div>
      </div>
    </van-sticky>
  </div>
</template>

<script>
export default {};
</script>


<style lang="less">
body {
  background: #fff;
}
.home {
  background: #fff;
  .top {
    margin: 0 20px;
    padding-top: 30px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    .icon-chuangjian {
      font-size: 28px;
      color: #f5c847;
      margin-right: 5px;
    }
    .ipt {
      position: relative;

      width: 80%;
      input {
        width: 86%;
        background: #f7f7f7;
        height: 33px;
        border: none;
        color: #9d9d9d;
        font-size: 15px;
        padding-left: 32px;
      }
      .icon-sousuo {
        position: absolute;
        left: 10px;
        top: 7px;
        color: #9d9d9d;
        font-size: 18px;
      }
    }

    .icon-liebiao {
      margin: 0 15px;
    }
    .icon-liebiao,
    .icon-tongzhi {
      color: #000;
      font-size: 18px;
    }
  }
  .title {
    display: flex;
    justify-content: space-around;
    .items {
      font-size: 14px;
      color: #404040;
      line-height: 22px;
      font-weight: bold;
      &.router-link-active {
        font-size: 18px;
        color: #010101;
        text-align: center;
        font-weight: bold;
      }
      &.router-link-active::after {
        content: "";
        display: block;
        margin: 5px auto;
        background: #ffc838;
        height: 2px;
        width: 15px;
      }
    }
  }
}
</style>